/********************
 ** Common Styles
 ********************/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body,
#root,
.app {
  height: 100vh;
  font-family: 'Times New Roman', Times, serif;
}

button {
  border: none;
  font-size: inherit;
}
.app {
  display: flex;
  flex-direction: column;
}

:focus {
  outline: 0;
}

/********************
 ** NavBar Styles
 ********************/
.nav-bar {
  text-align: center;
  line-height: 100px;
  background: #764abc;
  color: white;
  font-size: 26px;
  font-weight: bolder;
}

/********************
 ** Main Styles
 ********************/
main.contents {
  flex: 1;
  background: #f5f5f5;
  color: #444;
  padding: 16px 0;
  .todoapp {
    height: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 25px 50px 0 rgba(0, 0, 0, 0.1);
  }
}
/********************
 ** Header Styles
 ********************/
.header {
  .new-todo {
    width: 100%;
    font-size: 24px;
    font-family: inherit;
    line-height: 70px;
    padding: 0 50px;
    border: none;
    box-shadow: inset 0 -2px 1px rgba(0, 0, 0, 0.03);
  }
}

/********************
 ** Loading Styles
 ********************/
@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.loading {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: inline-block;
  border-top: 3px solid #ff3d00;
  border-right: 3px solid transparent;
  animation: rotation 1.5s linear infinite;
}

/********************
 ** TodoList Styles
 ********************/
.todo-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: scroll;
  ul.todo-list {
    list-style: none;
  }
  li {
    display: flex;
    align-items: center;
    font-size: 24px;
    &:not(:last-child) {
      border-bottom: 1px solid #ededed;
    }
    .segment {
      display: flex;
      align-items: center;
      &.label {
        flex-grow: 2;
      }
      .toggle {
        width: 40px;
        height: 40px;
        cursor: pointer;
        background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23ededed%22%20stroke-width%3D%223%22/%3E%3C/svg%3E');
        &.checked {
          background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23bddad5%22%20stroke-width%3D%223%22/%3E%3Cpath%20fill%3D%22%235dc2af%22%20d%3D%22M72%2025L42%2071%2027%2056l-4%204%2020%2020%2034-52z%22/%3E%3C/svg%3E');
        }
      }
    }
  }
}

.todo-list li .todo-text {
  margin: 5px;
  word-break: break-all;
  padding: 5px;
  display: block;
  line-height: 1.2;
  transition: color 0.4s;
  font-weight: 400;
  color: black;
  flex-grow: 2;
}

.todo-list li.completed label {
  color: #cdcdcd;
  text-decoration: line-through;
}

.todo-list li select.colorPicker {
  width: 90px !important;
  padding: 0.1rem 0 0.1rem 0.4rem;
  margin: 0 10px;
  height: 30px;
  line-height: 24px;
  font-weight: 700;
  cursor: pointer;
}

.todo-list li select.colorPicker option {
  font-weight: 700;
}

.todo-list li select.colorPicker option[value='green'] {
  color: green;
}

.todo-list li select.colorPicker option[value='blue'] {
  color: blue;
}

.todo-list li select.colorPicker option[value='orange'] {
  color: orange;
}

.todo-list li select.colorPicker option[value='purple'] {
  color: purple;
}

.todo-list li select.colorPicker option[value='red'] {
  color: red;
}

.todo-list li .destroy {
  width: 30px;
  height: 30px;
  margin-right: 10px;
  font-size: 30px;
  line-height: 30px;
  color: #cc9a9a;
  transition: color 0.2s ease-out;
  background: unset !important;
  border: unset !important;
  display: flex;
  justify-content: center;
  align-content: center;
  cursor: pointer;
}

.todo-list li .destroy:hover {
  color: #af5b5e;
}

/********************
 ** Footer Styles
 ********************/
.footer {
  padding: 10px 15px;
  text-align: center;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #e6e6e6;
  h5 {
    font-size: 16px;
    margin: 0 0 5px;
  }

  .actions {
    display: flex;
    flex-direction: column;
    .button {
      background: #1976d2;
      padding: 5px 16px;
      color: white;
      border-radius: 4px;
      font-weight: 700;
      margin-bottom: 10px;
      cursor: pointer;
      &:hover {
        background-color: #0250bc;
      }
    }
  }
  .todo-count strong {
    font-weight: 600;
  }

  .filters {
    text-align: left;
    ul {
      margin: 0;
      padding: 0;
      text-align: left;
      list-style: none;
    }
    &.FiltersStatus li button {
      color: inherit;
      margin: 3px;
      padding: 3px 7px;
      text-decoration: none;
      border: 2px solid transparent;
      border-radius: 3px;
      cursor: pointer;
      background: unset !important;
      &:hover {
        border-color: rgba(175, 47, 47, 0.1);
      }
      &.selected {
        border-color: rgba(175, 47, 47, 0.3);
      }
    }
    &.colorFilters .color-block {
      display: inline-block;
      width: 20px;
      height: 12px;
      border-radius: 3;
      margin-left: 5px;
      margin-right: 5px;
    }
  }
}
